Optimal. Leaf size=91 \[ -\frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{2 f (a+b)^{5/2}}-\frac {3 \cot (e+f x)}{2 f (a+b)^2}+\frac {\cot (e+f x)}{2 f (a+b) \left (a+b \tan ^2(e+f x)+b\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4132, 290, 325, 205} \[ -\frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{2 f (a+b)^{5/2}}-\frac {3 \cot (e+f x)}{2 f (a+b)^2}+\frac {\cot (e+f x)}{2 f (a+b) \left (a+b \tan ^2(e+f x)+b\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 290
Rule 325
Rule 4132
Rubi steps
\begin {align*} \int \frac {\csc ^2(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x^2 \left (a+b+b x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\cot (e+f x)}{2 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )}+\frac {3 \operatorname {Subst}\left (\int \frac {1}{x^2 \left (a+b+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{2 (a+b) f}\\ &=-\frac {3 \cot (e+f x)}{2 (a+b)^2 f}+\frac {\cot (e+f x)}{2 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )}-\frac {(3 b) \operatorname {Subst}\left (\int \frac {1}{a+b+b x^2} \, dx,x,\tan (e+f x)\right )}{2 (a+b)^2 f}\\ &=-\frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{2 (a+b)^{5/2} f}-\frac {3 \cot (e+f x)}{2 (a+b)^2 f}+\frac {\cot (e+f x)}{2 (a+b) f \left (a+b+b \tan ^2(e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 2.22, size = 242, normalized size = 2.66 \[ \frac {\sec ^4(e+f x) (a \cos (2 (e+f x))+a+2 b) \left (\frac {b ((a+2 b) \sin (2 e)-a \sin (2 f x))}{a (\cos (e)-\sin (e)) (\sin (e)+\cos (e))}+2 \csc (e) \sin (f x) \csc (e+f x) (a \cos (2 (e+f x))+a+2 b)+\frac {3 b (\cos (2 e)-i \sin (2 e)) (a \cos (2 (e+f x))+a+2 b) \tan ^{-1}\left (\frac {(\cos (2 e)-i \sin (2 e)) \sec (f x) (a \sin (2 e+f x)-(a+2 b) \sin (f x))}{2 \sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}\right )}{\sqrt {a+b} \sqrt {b (\cos (e)-i \sin (e))^4}}\right )}{8 f (a+b)^2 \left (a+b \sec ^2(e+f x)\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.64, size = 407, normalized size = 4.47 \[ \left [-\frac {4 \, {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {-\frac {b}{a + b}} \log \left (\frac {{\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} - 2 \, {\left (3 \, a b + 4 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + 4 \, {\left ({\left (a^{2} + 3 \, a b + 2 \, b^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (a b + b^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {b}{a + b}} \sin \left (f x + e\right ) + b^{2}}{a^{2} \cos \left (f x + e\right )^{4} + 2 \, a b \cos \left (f x + e\right )^{2} + b^{2}}\right ) \sin \left (f x + e\right ) + 12 \, b \cos \left (f x + e\right )}{8 \, {\left ({\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} f\right )} \sin \left (f x + e\right )}, -\frac {2 \, {\left (2 \, a - b\right )} \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {\frac {b}{a + b}} \arctan \left (\frac {{\left ({\left (a + 2 \, b\right )} \cos \left (f x + e\right )^{2} - b\right )} \sqrt {\frac {b}{a + b}}}{2 \, b \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) \sin \left (f x + e\right ) + 6 \, b \cos \left (f x + e\right )}{4 \, {\left ({\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} f\right )} \sin \left (f x + e\right )}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.47, size = 133, normalized size = 1.46 \[ -\frac {\frac {3 \, {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\relax (b) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )} b}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a b + b^{2}}} + \frac {3 \, b \tan \left (f x + e\right )^{2} + 2 \, a + 2 \, b}{{\left (b \tan \left (f x + e\right )^{3} + a \tan \left (f x + e\right ) + b \tan \left (f x + e\right )\right )} {\left (a^{2} + 2 \, a b + b^{2}\right )}}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.05, size = 86, normalized size = 0.95 \[ -\frac {b \tan \left (f x +e \right )}{2 f \left (a +b \right )^{2} \left (a +b +b \left (\tan ^{2}\left (f x +e \right )\right )\right )}-\frac {3 b \arctan \left (\frac {\tan \left (f x +e \right ) b}{\sqrt {\left (a +b \right ) b}}\right )}{2 f \left (a +b \right )^{2} \sqrt {\left (a +b \right ) b}}-\frac {1}{f \left (a +b \right )^{2} \tan \left (f x +e \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.47, size = 117, normalized size = 1.29 \[ -\frac {\frac {3 \, b \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {{\left (a + b\right )} b}} + \frac {3 \, b \tan \left (f x + e\right )^{2} + 2 \, a + 2 \, b}{{\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{3} + {\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.40, size = 91, normalized size = 1.00 \[ -\frac {\frac {1}{a+b}+\frac {3\,b\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,{\left (a+b\right )}^2}}{f\,\left (b\,{\mathrm {tan}\left (e+f\,x\right )}^3+\left (a+b\right )\,\mathrm {tan}\left (e+f\,x\right )\right )}-\frac {3\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {b}\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^2+2\,a\,b+b^2\right )}{{\left (a+b\right )}^{5/2}}\right )}{2\,f\,{\left (a+b\right )}^{5/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________